import re

my_reg = r"https?:\/{2}[^\/]*test"
url = "https://www.example.test.com/test/a/b/c"

match = re.match(pattern=my_reg, string=url)
print(match)
